#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
void reverse(char* start, char* end) {
	int tmp;
	while (start < end) {
		tmp = *start;
		*start = *end;
		*end = tmp;
		start++;
		end--;
	}
}

int leftturn(char* arr, int k) {
	int end = strlen(arr);
	reverse(arr, arr + k - 1);
	reverse(arr + k, arr + end - 1);
	reverse(arr, arr + end - 1);
}

int main() {

	char arr[] = "ABCDE";
	leftturn(arr, 2);
	puts(arr);
	system("pause");
	return 0;
}
